# -*- encoding:utf-8 -*-
from demo import app
import hooks
import os

# 设置钩子 START
@app.before_request
def hooks_before_req():
    hooks.load_db()

@app.teardown_request
def hooks_teardown_req(exception):
    hooks.admin_req_log()
    hooks.clear_db()
# END

# 加载分发器
from dispatch import get_module
get_module(os.path.dirname(__file__))
